import axios from 'axios'
 
axios.defaults.baseURL = 'http://localhost:3000'
 
export const addUser = (data:any) => axios.post('/crud',data).then(res => res.data)
 
export const getList = (data:any) => axios.get('/crud',{params:data}).then(res => res.data)
 
export const delUser = (data:any) => axios.delete(`/crud/${data.id}`).then(res => res.data)
 
export const updateUser = (data: any) => axios.patch(`/crud/${data.id}`, data).then(res => res.data)

//添加tags
export const addTags = (data:any) => axios.post(`/crud/add/tags`,data).then(res => res.data)